The present invention relates to math processors for doing floating point divide and square root operations.
Typically, divide and square root operations are calculated in math coprocessors with a tedious method of subtracting and shifting, as with long division by hand. The disadvantage of this method is that it takes a long time to complete all of the necessary subtract and shift operations.
One method used to improve the speed of division and square root operations takes advantage of quadratic convergence. If one is trying to determine y/x, first, a determination of 1/x is made, but by methods other than the tedious long division. Then, a multiplication operation can be used (y multiplied by 1/x), which speeds up the calculation. One way of determining the value of 1/x would be to store all the possible values in a memory. However, for the number of bits of accuracy required, this would have to be a huge memory. Accordingly, the value of 1/x is calculated each time for different values of x. One method is to begin with a low accuracy initial approximation and improve it using a Newton-Raphson iteration. Such a method is described in S. Waser and M. J. Flynn, "Introduction to Arithmetic for Digital Systems Designers", CBS College Publishing, New York, 1982. The iteration uses the equation F.sub.K+1 =F.sub.K (2-x F.sub.K), where F.sub.K is an approximation to 1/x. By using an initial approximation of F.sub.K and doing a number of iterations, its accuracy can be improved to the point necessary through quadratic convergence. The x operand is typically normalized to within the range 1.ltoreq.x&lt;2, and an initial approximation of 1/x can be chosen from values stored in a ROM. A technique similar to the one described above for 1/x is also used to compute square roots. This technique first computes 1/.sqroot.x and then multiplies it by x to produce .sqroot.x. If desired, the initial approximation to 1/.sqroot.x can be improved through a Newton-Raphson iteration similar to that above.